package com.fmc123.base.modules.service;

import java.io.Serializable;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.fmc123.base.modules.dao.UserDao;
import com.fmc123.base.modules.entity.SysUser;
import com.fmc123.base.pesistence.Page;
import com.fmc123.base.pesistence.SimpleHibernateDao;
import com.fmc123.base.service.BaseService;

/**
* @ClassName: UserService
* @Description: 用户service
* @author fmc
* @date 2015年9月13日下午5:02:18
 */
@Service
public class UserService extends BaseService<SysUser,Serializable>{

  @Autowired
  private UserDao userDao;
  @Override
  public SimpleHibernateDao<SysUser, Serializable> getEntityDao() {
    return userDao;
  }

  /**
   * 分页查询user
   * @param page分页对象
   * @param user 保存有查询参数的SysUser对象
   * @return
   */
  public Page<SysUser> find(Page<SysUser> page,SysUser user){
    return userDao.searchEntity(page, user);
  }
}
